1. Technical Field
This invention relates to a method, system, and computer program product for creating a buffer point-in-time copy relationship for a point-in-time copy function executed to create a point-in-time copy relationship.
2. Related Art
The storage of data in large organisations is of fundamental importance, both for reliability of the data and for the ability to recover data in the event of any hardware failure. Storage Area Network (SAN) is an architecture that is used when very large amounts of data are needed to be stored in a reliable and secure manner. This technology allows networks to be created that support the attachment of remote computer storage devices such as disk arrays to servers in such a way that, to the operating system, the devices appear as locally attached. It is common in these networks to include a large amount of redundancy, both in the data storage and in the hardware connections between the individual components.
Various methods exist for creating data redundancy. For example, a function such as a FlashCopy® function enables an administrator to make point-in-time, full volume copies of data, with the copies immediately available for read or write access. (FlashCopy is a registered trademark of International Business Machines Corporation in the United States and other countries) The FlashCopy function can be used with standard backup tools that are available in the environment to create backup copies on tape. The FlashCopy function creates a copy of a source volume on a target volume. This copy, as mentioned above, is called a point-in-time copy. When a FlashCopy operation is initiated, a relationship is created between a source volume and target volume. This relationship is a “mapping” of the source volume and the target volume. This mapping allows a point-in-time copy of that source volume to be copied to the associated target volume. The relationship exists between this volume pair from the time that the FlashCopy operation is initiated until the storage unit copies all data from the source volume to the target volume, or the relationship is deleted.
When the data is physically copied, a background process copies tracks from the source volume to the target volume. The amount of time that it takes to complete the background copy depends on various criteria, such as the amount of data being copied, the number of background copy processes that are running and any other activities that are presently occurring. The FlashCopy function works in that the data which is being copied does not actually need to be copied instantaneously, it only needs to be copied just prior to an update causing on overwrite of any old data on the source volume. So, as data changes on the source volume, the original data is copied to the target volume before being overwritten on the source volume.
Therefore, a FlashCopy is a feature supported on various storage devices that allows a user or an automated process to make nearly instantaneous copies of entire logical volumes of data. A copy of a source disk is made on a target disk. The copies are immediately available for both read and write access. A common feature of FlashCopy like implementations is the ability to reverse the copy. That is, to populate the source disk of a FlashCopy map with the contents of the target disk. It is also possible to use FlashCopy in cascaded implementations, in which a target disk later becomes the source disk for a further FlashCopy or vice versa.
In order to keep track of such cascaded storage volumes and FlashCopy functions, it is preferable to provide a data structure that defines primary and secondary “fdisks”. An fdisk is a logical component that includes an index defining the storage volume to which the fdisk relates and providing links to the relevant maps that define the up and down directions of the FlashCopy functions in a cascade. When a FlashCopy function is created between a source volume and a target volume, then primary fdisks are created for each storage volume, unless a primary fdisk already exists for the target disk, in which case that existing fdisk for the target volume is converted to a secondary fdisk and a new primary fdisk is created. The advantage of using a data structure as defined by the fdisks is that the fdisks can be used to keep track of the IO read and write accesses to different storage volumes within existing multiple cascades and direct data reads to the correct location within the cascade.